/*******************************************************************************
 * Copyright (c) 2016, 2020 Red Hat Inc and others
 * 
 * This program and the accompanying materials are made
 * available under the terms of the Eclipse Public License 2.0
 * which is available at https://www.eclipse.org/legal/epl-2.0/
 * 
 * SPDX-License-Identifier: EPL-2.0
 * 
 * Contributors:
 *  Red Hat Inc
 *******************************************************************************/
package org.eclipse.kura.camel.runner;

import org.apache.camel.CamelContext;

@FunctionalInterface
public interface RoutesProvider {

    /**
     * Apply the desired state of camel routes to the context
     * <p>
     * <strong>Note: </strong> This method may need to stop and remove
     * routes which are no longer used
     * </p>
     *
     * @param camelContext
     *            the context the routes should by applied to
     * @throws Exception
     *             if anything goes wrong
     */
    public void applyRoutes(CamelContext camelContext) throws Exception;
}